package top.mayyd.productfeignconsumer.client;

import org.springframework.stereotype.Component;
import top.mayyd.producteurekaservice.domain.Product;

//需要加上该配置，否则会报错：No fallback instance of type class top.mayyd.productfeignconsumer.client.ProductClientFallBack found for feign client product-eureka-service
@Component
public class ProductClientFallBack implements ProductClient {
    @Override
    public Product queryById(Long id) {
        Product product = new Product();
        product.setProductName("查询异常~");
        return product;
    }
}
